package com.zhuiyun.project.api.system.user.entity;

import com.zhuiyun.project.common.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.Id;

/**
 * @ClassName SysUserRoleModel
 * @Description TODO
 * @Author hbx
 * @Date 2023/6/16 10:10
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
/**
 * @Author hbx
 * @Description 用户角色管理表
 * @Date 2023/6/16 10:15
 * @param null
 */
public class SysUserRole extends BaseEntity {

    /**
     * @Author hbx
     * @Description 用户id
     * @Date 2023/6/16 10:12
     * @param null
     */
    @Id
    private Long userId;

    /**
     * @Author hbx
     * @Description 角色id
     * @Date 2023/6/16 10:14
     * @param null
     */
    @Id
    private Long roleId;

    public Long getUserId()
    {
        return userId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getRoleId()
    {
        return roleId;
    }

    public void setRoleId(Long roleId)
    {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("roleId", getRoleId())
                .toString();
    }
}
